package Euler5;

public class EvenlyDivisibleNumber {
	public static void main(String[] args) {
		long counter = 40;
		boolean done = false;
		long max = (long) Math.pow(2, 63)-1;
		
		while(!done && (counter < max)){
			for(int i = 1; i<=20; i++)
			{
				if((counter % i) != 0)
				{
					break;
				}
				else if(i == 20)
				{
					done = true;
				}
			}
			
			if (!done){
				counter += 20;
			}
		}
		
		System.out.println(counter);
	}
}
